<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:p="http://primefaces.prime.com.tr/ui"
      xmlns:f="http://java.sun.com/jsf/core">
    <ui:composition template="templates/template.xhtml">
        <h:head>
            <title>Alterar Esquemas</title>
        </h:head>
        <ui:define name="content">
            <h:body>
                <h:form>

                   
                    <!-- Painel -->
                    <center>
                        <p:panel id="panel" header="#{msgs.alterarEsquemas}">  
                            <h:panelGrid columns="3">  

                                <h:outputLabel for="nome" value="#{msgs.nome}: *" />  
                                <p:inputText id="nome"  value="#{esquemaBean.esquema.nome}" size="50" requiredMessage="Nome é um campo obrigatório"
                                             required="true" label="Novo Projeto" disabled="true"/>
                                <p:message for="nome" />  


                                <h:outputLabel for="descricao" value="#{msgs.descricao}: *"/>
                                <p:inputTextarea id ="descricao" rows="3" style="width: 423px" value="#{esquemaBean.esquema.descricao}" 
                                                 required="true" label="Descrição" requiredMessage="#{msgs.campoobrigatorio}" >
                                </p:inputTextarea>
                                <p:message for="descricao" />  

                                <h:outputLabel for="categoria" value="#{msgs.categoria}: *"/>
                                <p:inputText id="categoria" 
                                             value="#{esquemaBean.esquema.categoria}" size="50" 
                                             required="true" label="Categoria" requiredMessage="#{msgs.campoobrigatorio}" >
                                </p:inputText> 
                                <p:message for="categoria" />  

                                <h:outputLabel for="bancodado" value="#{msgs.bancodados}: *"/>
                                <p:inputText id="bancodado" 
                                             value="#{esquemaBean.esquema.nomeBd}" size="50" 
                                             required="true" label="Banco de Dados" requiredMessage="#{msgs.campoobrigatorio}" >
                                </p:inputText> 
                                <p:message for="bancodado" /> 

                                <h:outputLabel for="projeto" value="#{msgs.nomeprojeto}: *"/>
                                <p:inputText id="projeto" 
                                             value="#{esquemaBean.esquema.nomeProjeto}" size="50" 
                                             required="true" label="projeto" requiredMessage="#{msgs.campoobrigatorio}" >
                                </p:inputText> 
                                <p:message for="projeto" /> 
                            </h:panelGrid>  
                        </p:panel> 

                        <p:panel header="#{msgs.    addprojetistas}">  
                            <h:panelGrid columns="2" cellpadding="5">
                                <h:outputText id="email_projetista" value="#{msgs.emailprojetista}: *"/>
                                <p:inputText id="email_projetist" 
                                             value="" size="50" 
                                             required="true">
                                </p:inputText>  

                                <h:outputText id="lista_projetista" value="#{msgs.listaprojetistas}: *"/>
                                <p:inputTextarea rows="3" style="width: 423px" id="lista_projetist" 
                                                 value=""  
                                                 required="true">
                                </p:inputTextarea>
                            </h:panelGrid>
                        </p:panel> 

                    </center>


                    <!-- Botões -->
                    <center>
                        <h:panelGrid columns="2" style="margin-top:10px">  
                            <p:commandButton value="#{msgs.salvar}" actionListener="#{esquemaBean.alterar()}" update="display" oncomplete="dlg.show()"  
                                             image="ui-icon ui-icon-disk" />  
                            <p:commandButton value="#{msgs.cancelar}" update="display" oncomplete="dlg.show()"  /> 


                        </h:panelGrid> 
                    </center>
                    <br></br>


                </h:form>

            </h:body>
        </ui:define>

    </ui:composition>
</html>